#include <stdio.h>

int main()
{
    double a;
    int b;
    int c, m, n = 0;
    double min = 100;
    scanf("%lf %d %d", &a, &b, &c);
    double d;
    d = a / b;
    for (double i = 1; i <= c; i++)
    {
        for (int j = 1; j <= c; j++)
        {
            double f;
            f = i / j;
            if (f >= d && ((f - d) <= min))
            {
                m = i;
                n = j;
                min = f - d;
            }
        }
    }
    for (int i = 2;; i++)
    {
        if (i > n)
            break;
        while (m % i == 0 && n % i == 0)
        {
            m = m / i;
            n = n / i;
        }
    }
    printf("%d %d", m, n);
    return 0;
}
   